Skip to content

NO-JIRA: test ai-sbom plugin and verify plugin loading - #8614

Merged
celebdor merged 1 commit into
openshift:mainfrom
bryan-cox:test-arc-runners
May 28, 2026
Merged

NO-JIRA: test ai-sbom plugin and verify plugin loading#8614
celebdor merged 1 commit into
openshift:mainfrom
bryan-cox:test-arc-runners

Conversation

@bryan-cox

@bryan-cox bryan-cox commented May 27, 2026

Copy link
Copy Markdown
Member

Summary

  • Enable ai-sbom plugin in addition to hello-world, jira, ci
  • Replace ambiguous hello-world test with ai-sbom generation that proves plugins are loaded
  • Use --model claude-opus-4-6 for the test invocation
  • Verify output contains SBOM-specific content that Claude wouldn't produce without the plugin

Test plan

  • Merge to main (issue_comment runs from default branch)
  • Post /test-wif on any PR to trigger the workflow
  • Verify the ai-sbom plugin produces an ai-assisted block

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated CI workflow to enable an AI SBOM plugin and strengthen test validation of AI plugin execution.
    • Improved test logging and failure handling to surface plugin execution issues during automated runs.

Note: These are infrastructure/testing updates with no direct impact on user-facing functionality.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label May 27, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@bryan-cox: This pull request explicitly references no jira issue.

Details

In response to this:

Summary

  • Enable ai-sbom plugin in addition to hello-world, jira, ci
  • Replace ambiguous hello-world test with ai-sbom generation that proves plugins are loaded
  • Use --model claude-opus-4-6 for the test invocation
  • Verify output contains SBOM-specific content that Claude wouldn't produce without the plugin

Test plan

  • Merge to main (issue_comment runs from default branch)
  • Post /test-wif on any PR to trigger the workflow
  • Verify the ai-sbom plugin produces an ai-assisted block

🤖 Generated with Claude Code

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot added do-not-merge/needs-area needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels May 27, 2026
@openshift-ci

openshift-ci Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

Please specify an area label

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@coderabbitai

coderabbitai Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 5f5f974a-fd09-47e6-96d9-cf75670bac7c

📥 Commits

Reviewing files that changed from the base of the PR and between 2a6acff and b1ddcff.

📒 Files selected for processing (1)
  • .github/workflows/claude-wif-test.yaml

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting


📝 Walkthrough

Walkthrough

This PR updates the .github/workflows/claude-wif-test.yaml workflow to enable the ai-sbom@ai-helpers plugin in the ai-helpers settings and to replace the Claude test command with an AI SBOM prompt (using claude-opus-4-6). The test now tees CLI output to /tmp/claude-output.txt and validates plugin execution by grepping for SBOM-related markers, printing the captured output and failing the step if no markers are found.

Sequence Diagram(s)

sequenceDiagram
  participant ComponentA
  participant ComponentB
  ComponentA->>ComponentB: observable interaction
Loading

Possibly related PRs

Suggested reviewers

  • csrwng
  • Nirshal

Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error)

Check name Status Explanation Resolution
No-Sensitive-Data-In-Logs ❌ Error Raw Claude output is logged via tee/cat while GCP WIF credentials are in scope, exposing potential token leakage to workflow logs. Remove raw output logging (line 73 cat) before calling Claude, mask sensitive outputs, or remove cloud auth from steps with Claude invocation.
✅ Passed checks (10 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main changes: testing the ai-sbom plugin and verifying plugin loading in the Claude workflow.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed Custom check for Ginkgo test names is not applicable—PR modifies only .github/workflows/claude-wif-test.yaml (GitHub Actions workflow YAML), which contains no Ginkgo test framework code.
Test Structure And Quality ✅ Passed This PR modifies only .github/workflows/claude-wif-test.yaml, a GitHub Actions workflow file, not Ginkgo test code. The custom check requesting review of Ginkgo test quality is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed PR only modifies GitHub Actions workflow file (.github/workflows/claude-wif-test.yaml), not deployment manifests, operators, or controllers. Check does not apply.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed Custom check not applicable: PR modifies GitHub Actions workflow (.yaml), not Ginkgo e2e tests. Check applies only to new Ginkgo e2e test additions.
No-Weak-Crypto ✅ Passed The workflow file contains no weak cryptography implementations (no MD5, SHA1, DES, RC4, 3DES, Blowfish, ECB usage), custom crypto code, or non-constant-time secret comparisons.
Container-Privileges ✅ Passed No privileged container configurations found. The workflow file contains no privileged, hostPID, hostNetwork, hostIPC, SYS_ADMIN, allowPrivilegeEscalation, or runAsRoot settings.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci
openshift-ci Bot requested review from Nirshal and csrwng May 27, 2026 22:50
@openshift-ci

openshift-ci Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bryan-cox

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 27, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/claude-wif-test.yaml:
- Around line 68-74: The workflow currently checks out PR-head contents and runs
the Claude invocation (the `claude -p ...` call) after GCP WIF auth, writing raw
model output to /tmp/claude-output.txt and echoing it with tee/cat — replace
that with a trusted fixture or default-branch checkout instead of the PR head,
remove or revoke GCP WIF auth credentials before calling `claude -p`, and stop
piping raw model output to stdout; write output only to a local file (e.g.,
/tmp/claude-output.txt) and use grep -qi on that file, emitting only safe
success/failure messages (no cat/tee of the full file) or redact sensitive lines
if you must print content. Ensure the changes reference the existing `claude -p
"Generate an AI SBOM for this session." --model claude-opus-4-6 --max-turns 1`,
`/tmp/claude-output.txt`, and any checkout step so reviewers can locate and
update the workflow.
- Line 69: The current grep check uses a broad "sbom" token which can match
normal model output; update the grep pattern in the if that scans
/tmp/claude-output.txt to only match the plugin-specific marker(s) you asserted
(e.g., "ai-assisted" or the exact plugin tag "ai-sbom"/"ai.sbom") so the
workflow only succeeds when the AI-SBOM plugin block is present; locate the line
containing grep -qi "ai-assisted\|ai.sbom\|sbom" and replace the pattern to
exclude the bare "sbom" token, keeping only the distinctive marker(s) like
"ai-assisted" (and optionally "ai-sbom" or "ai.sbom") to tighten the success
check.
- Around line 56-59: The workflow currently clones the moving default branch
with git clone (git clone ... ai-helpers -> /tmp/ai-helpers), which allows
unreviewed plugin changes to be pulled; update the checkout to pin to an
immutable commit SHA by checking out a specific commit in /tmp/ai-helpers
immediately after clone (or using a shallow clone of that SHA) so the
marketplace code used for "$HOME/.claude/plugins/known_marketplaces.json" and
"$HOME/.claude/settings.json" is fixed; ensure the commit SHA is represented as
a variable or literal in the workflow and document/update it deliberately when
you want to change versions.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 902d8166-5903-4e3c-a5ce-90eda11a7f32

📥 Commits

Reviewing files that changed from the base of the PR and between 0aa20fc and 2a6acff.

📒 Files selected for processing (1)
  • .github/workflows/claude-wif-test.yaml

Comment on lines +56 to +59
git clone --depth 1 https://github.com/openshift-eng/ai-helpers.git /tmp/ai-helpers
mkdir -p "$HOME/.claude/plugins"
printf '%s\n' '{"enabledPlugins":{"hello-world@ai-helpers":true,"ai-sbom@ai-helpers":true,"jira@ai-helpers":true,"ci@ai-helpers":true}}' > "$HOME/.claude/settings.json"
printf '%s\n' '{"ai-helpers":{"source":{"source":"directory","path":"/tmp/ai-helpers"},"installLocation":"/tmp/ai-helpers","lastUpdated":"2025-10-27T12:00:00.000Z"}}' > "$HOME/.claude/plugins/known_marketplaces.json"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Pin ai-helpers to an immutable commit.

Line 56 clones the marketplace from the moving default branch, so this trusted workflow can start executing new plugin code without any change in this repo. Please pin the checkout to a specific commit SHA and update it deliberately.

Suggested hardening
-          git clone --depth 1 https://github.com/openshift-eng/ai-helpers.git /tmp/ai-helpers
+          AI_HELPERS_SHA="<pinned-commit-sha>"
+          git clone https://github.com/openshift-eng/ai-helpers.git /tmp/ai-helpers
+          git -C /tmp/ai-helpers checkout --detach "$AI_HELPERS_SHA"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/claude-wif-test.yaml around lines 56 - 59, The workflow
currently clones the moving default branch with git clone (git clone ...
ai-helpers -> /tmp/ai-helpers), which allows unreviewed plugin changes to be
pulled; update the checkout to pin to an immutable commit SHA by checking out a
specific commit in /tmp/ai-helpers immediately after clone (or using a shallow
clone of that SHA) so the marketplace code used for
"$HOME/.claude/plugins/known_marketplaces.json" and
"$HOME/.claude/settings.json" is fixed; ensure the commit SHA is represented as
a variable or literal in the workflow and document/update it deliberately when
you want to change versions.

Comment on lines +68 to +74
claude -p "Generate an AI SBOM for this session." --model claude-opus-4-6 --max-turns 1 | tee /tmp/claude-output.txt
if grep -qi "ai-assisted\|ai.sbom\|sbom" /tmp/claude-output.txt; then
echo "Plugin verified: ai-sbom plugin executed successfully"
else
echo "ERROR: ai-sbom plugin output not detected"
cat /tmp/claude-output.txt
exit 1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | 🏗️ Heavy lift

Don't run Claude on PR-head contents with WIF creds in scope.

On issue_comment, this job checks out the PR head and then invokes Claude after GCP WIF auth. That lets a fork PR feed attacker-controlled repository files into an agentic tool while cloud credentials are available, and tee/cat will echo any induced exfiltration into the workflow logs. For this smoke test, use a trusted fixture/default-branch checkout instead, or at minimum remove cloud auth and avoid logging raw model output before invoking Claude.

As per coding guidelines, "No secrets in logs; mask sensitive outputs" and "Agentic CI actions: audit for prompt injection via issue/PR title/body flowing into LLM prompts".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/claude-wif-test.yaml around lines 68 - 74, The workflow
currently checks out PR-head contents and runs the Claude invocation (the
`claude -p ...` call) after GCP WIF auth, writing raw model output to
/tmp/claude-output.txt and echoing it with tee/cat — replace that with a trusted
fixture or default-branch checkout instead of the PR head, remove or revoke GCP
WIF auth credentials before calling `claude -p`, and stop piping raw model
output to stdout; write output only to a local file (e.g.,
/tmp/claude-output.txt) and use grep -qi on that file, emitting only safe
success/failure messages (no cat/tee of the full file) or redact sensitive lines
if you must print content. Ensure the changes reference the existing `claude -p
"Generate an AI SBOM for this session." --model claude-opus-4-6 --max-turns 1`,
`/tmp/claude-output.txt`, and any checkout step so reviewers can locate and
update the workflow.

claude --version
claude -p "/hello-world:echo HyperShift" --max-turns 1
claude -p "Generate an AI SBOM for this session." --model claude-opus-4-6 --max-turns 1 | tee /tmp/claude-output.txt
if grep -qi "ai-assisted\|ai.sbom\|sbom" /tmp/claude-output.txt; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Tighten the success check to a plugin-only marker.

Including bare sbom in Line 69 makes this pass on normal model output, so the workflow no longer proves ai-sbom loaded. Match only the distinctive plugin marker you called out in the PR, such as the ai-assisted block.

Suggested fix
-          if grep -qi "ai-assisted\|ai.sbom\|sbom" /tmp/claude-output.txt; then
+          if grep -qi "ai-assisted" /tmp/claude-output.txt; then
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if grep -qi "ai-assisted\|ai.sbom\|sbom" /tmp/claude-output.txt; then
if grep -qi "ai-assisted" /tmp/claude-output.txt; then
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/claude-wif-test.yaml at line 69, The current grep check
uses a broad "sbom" token which can match normal model output; update the grep
pattern in the if that scans /tmp/claude-output.txt to only match the
plugin-specific marker(s) you asserted (e.g., "ai-assisted" or the exact plugin
tag "ai-sbom"/"ai.sbom") so the workflow only succeeds when the AI-SBOM plugin
block is present; locate the line containing grep -qi
"ai-assisted\|ai.sbom\|sbom" and replace the pattern to exclude the bare "sbom"
token, keeping only the distinctive marker(s) like "ai-assisted" (and optionally
"ai-sbom" or "ai.sbom") to tighten the success check.

@hypershift-jira-solve-ci

Copy link
Copy Markdown
Contributor

Now I have the full root cause. Both PRs modify the exact same lines in .github/workflows/claude-wif-test.yaml — they both add the "Set up ai-helpers plugins" step and remove the container image — but with slightly different content (PR 8614 adds "ai-sbom@ai-helpers":true to the enabledPlugins and changes the test command). The merge commit 0aa20fcc includes PR 8611's version, and PR 8614's version conflicts with it.

Test Failure Analysis Complete

Job Information

  • Prow Job: pull-ci-openshift-hypershift-main-verify-deps, pull-ci-openshift-hypershift-main-images, pull-ci-openshift-hypershift-main-okd-scos-images
  • Build IDs: 2059769247218798592, 2059769247160078336, 2059769247193632768
  • PR: #8614NO-JIRA: test ai-sbom plugin and verify plugin loading
  • Branch: test-arc-runners

Test Failure Analysis

Error

Auto-merging .github/workflows/claude-wif-test.yaml
CONFLICT (content): Merge conflict in .github/workflows/claude-wif-test.yaml
Automatic merge failed; fix conflicts and then commit the result.
# Error: exit status 1
# Final SHA: 
# Total runtime: 0s

Summary

All three Prow jobs (verify-deps, images, okd-scos-images) fail identically during the git clone/merge phase before any CI step runs. The PR branch test-arc-runners cannot be cleanly merged into main because .github/workflows/claude-wif-test.yaml has a content conflict. PR #8611 (merged 2026-05-27T20:19:24Z from the same branch test-arc-runners) already landed changes to this file on main, and PR #8614 modifies the same lines differently — making it unmergeable. This is not a product bug or test issue; it is a branch management problem.

Root Cause

PR #8614 and the already-merged PR #8611 both originate from the same branch (test-arc-runners) and both modify .github/workflows/claude-wif-test.yaml in overlapping ways:

  1. PR NO-JIRA: replace container image with workflow-step plugin setup #8611 (merged → commit 0aa20fcc on main):

    • Removed the container: image: block
    • Added a "Set up ai-helpers plugins" step with enabledPlugins: {"hello-world@ai-helpers":true,"jira@ai-helpers":true,"ci@ai-helpers":true}
    • Kept the original test command: claude -p "/hello-world:echo HyperShift" --max-turns 1
  2. PR NO-JIRA: test ai-sbom plugin and verify plugin loading #8614 (this PR, still open):

    • Also removes the container: image: block (same change)
    • Also adds a "Set up ai-helpers plugins" step but with an additional plugin: "ai-sbom@ai-helpers":true in the enabledPlugins JSON
    • Replaces the test command with a new ai-sbom verification test

Because both PRs make conflicting edits to the same region of the file (the plugins setup step and the test command section), git cannot auto-merge PR #8614's commit (2a6acff9) into the current main (0aa20fcc). The Prow CI clone step fails with exit status 1 before any build or test work begins.

GitHub correctly reports the PR's mergeable status as CONFLICTING.

Recommendations
  1. Rebase PR NO-JIRA: test ai-sbom plugin and verify plugin loading #8614 onto current main — since PR NO-JIRA: replace container image with workflow-step plugin setup #8611 has already been merged, rebase test-arc-runners on top of main and resolve the conflict in .github/workflows/claude-wif-test.yaml. The resolution should keep PR NO-JIRA: replace container image with workflow-step plugin setup #8611's base changes and layer on PR NO-JIRA: test ai-sbom plugin and verify plugin loading #8614's additions (the ai-sbom@ai-helpers plugin and the new test command).

  2. Force-push the rebased branch — after resolving the conflict locally, force-push to test-arc-runners to update PR NO-JIRA: test ai-sbom plugin and verify plugin loading #8614. Prow will automatically re-trigger the CI jobs.

  3. Consider separate branches for sequential PRs — since both PRs came from the same branch test-arc-runners, future work should use separate feature branches to avoid merge conflicts when one PR lands before the other.

Evidence
Evidence Detail
Failure point Git merge during Prow clone phase — before any CI step executes
Conflicting file .github/workflows/claude-wif-test.yaml
PR #8611 merge commit 0aa20fcc3847407445a5aa9d568b3a9e1d0b6c01 (now on main)
PR #8614 head commit 2a6acff99c7eafb3c4cabb3be531a0a83a39a537
Shared branch Both PRs use test-arc-runners
PR #8611 merged at 2026-05-27T20:19:24Z
GitHub mergeable status CONFLICTING
Conflict region Lines 20-65: container: removal + "Set up ai-helpers plugins" step + test command block
All 3 jobs identical verify-deps, images, and okd-scos-images all fail with the exact same merge conflict
Tide error Expected consequence — Tide cannot merge a PR with conflicts

The container: directive requires containerMode on ARC runners which
needs anyuid SCC and a long-running process. Replace it by installing
Claude and cloning ai-helpers directly in workflow steps.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 28, 2026
@celebdor
celebdor merged commit 307934b into openshift:main May 28, 2026
13 of 18 checks passed
@bryan-cox

Copy link
Copy Markdown
Member Author

/test-wif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/needs-area jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants